using System;
using System.Xml.Serialization;
using System.Collections;

namespace VPLink.WebParts
{
	/// <summary>
	/// Summary description for taSPListItem.
	/// </summary>
	[XmlRootAttribute("Item", IsNullable = false)]
	public class taSPListItem
	{
		[XmlAttributeAttribute]
		public string Id = "-1";
		[XmlAttributeAttribute]
		public string ApprovalStatus;

		public taSPListItem()
		{

		}

		public void AddField(string Name, string Type, string Value, string Width, string Align)
		{
			taSPField field = new taSPField();
			field.Name = Name;
			field.Type = Type;
			field.Value = Value;
			field.Width = Width;
			field.Align = Align;
			mFieldList.Add(field);
		}

		private ArrayList mFieldList = new ArrayList();
		[XmlArrayAttribute("Fields")]
		[XmlArrayItemAttribute(ElementName = "Field", 
			 IsNullable = true,
			 Type = typeof(taSPField))]	
		public ArrayList FieldList
		{
			get	
			{
				return mFieldList;
			}
			set 
			{
				mFieldList = value;
			}
		}	
	
	}
}
